// ******************************************************************************
// Copyright     :  Copyright (C) 2020, Hisilicon Technologies Co. Ltd.
// File name     :  ras_c_union_define.h
// Project line  :  ICT
// Department    :  ICT Processor
// Version       :  V100
// Date          :
// Description   :  The description of P680 project
// Others        :  Generated automatically by nManager V5.1
// ******************************************************************************

#ifndef RAS_C_UNION_DEFINE_H
#define RAS_C_UNION_DEFINE_H

/* Define the union csr_err_mapping_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_typ0_map_to_fhi_en : 1; /* [0] */
        u32 int_typ0_map_to_eri_en : 1; /* [1] */
        u32 int_typ1_map_to_fhi_en : 1; /* [2] */
        u32 int_typ1_map_to_eri_en : 1; /* [3] */
        u32 int_typ2_map_to_fhi_en : 1; /* [4] */
        u32 int_typ2_map_to_eri_en : 1; /* [5] */
        u32 to_gic_fhi_en : 1;          /* [6] */
        u32 rsv_0 : 25;                 /* [31:7] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_err_mapping_u;

/* Define the union csr_int_typ0_ena_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_typ0_ena : 32; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_int_typ0_ena_u;

/* Define the union csr_int_typ0_ena_h_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_typ0_ena_h : 26; /* [25:0] */
        u32 rsv_1 : 6;           /* [31:26] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_int_typ0_ena_h_u;

/* Define the union csr_int_typ1_ena_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_typ1_ena : 32; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_int_typ1_ena_u;

/* Define the union csr_int_typ1_ena_h_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_typ1_ena_h : 26; /* [25:0] */
        u32 rsv_2 : 6;           /* [31:26] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_int_typ1_ena_h_u;

/* Define the union csr_int_typ2_ena_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_typ2_ena : 32; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_int_typ2_ena_u;

/* Define the union csr_int_typ2_ena_h_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_typ2_ena_h : 26; /* [25:0] */
        u32 rsv_3 : 6;           /* [31:26] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_int_typ2_ena_h_u;

/* Define the union csr_int_typ0_status_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_typ0_status : 32; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_int_typ0_status_u;

/* Define the union csr_int_typ0_status_h_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_typ0_status_h : 26; /* [25:0] */
        u32 rsv_4 : 6;              /* [31:26] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_int_typ0_status_h_u;

/* Define the union csr_int_typ1_status_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_typ1_status : 32; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_int_typ1_status_u;

/* Define the union csr_int_typ1_status_h_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_typ1_status_h : 26; /* [25:0] */
        u32 rsv_5 : 6;              /* [31:26] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_int_typ1_status_h_u;

/* Define the union csr_int_typ2_status_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_typ2_status : 32; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_int_typ2_status_u;

/* Define the union csr_int_typ2_status_h_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_typ2_status_h : 26; /* [25:0] */
        u32 rsv_6 : 6;              /* [31:26] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_int_typ2_status_h_u;

/* Define the union csr_int_node_num_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_node_num : 32; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_int_node_num_u;

/* Define the union csr_ej_ctrl_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 ej_ctrl_en : 1; /* [0] */
        u32 rsv_7 : 31;     /* [31:1] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_ej_ctrl_u;

/* Define the union csr_ce_cnt_cfg_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_ce_cnt_cfg : 16; /* [15:0] */
        u32 rsv_8 : 16;          /* [31:16] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_ce_cnt_cfg_u;

/* Define the union csr_int_src_trigger_type_l_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_src_trigger_type_l : 32; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_int_src_trigger_type_l_u;

/* Define the union csr_int_src_trigger_type_h_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 int_src_trigger_type_h : 32; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_int_src_trigger_type_h_u;

/* Define the union csr_ras_ctrl_iid_u */
typedef union {
    /* Define the struct bits */
    struct {
        u32 ras_ctrl_iid : 32; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    u32 value;
} csr_ras_ctrl_iid_u;


// ==============================================================================
/* Define the global struct */
typedef struct {
    volatile csr_err_mapping_u err_mapping;                       /* 0 */
    volatile csr_int_typ0_ena_u int_typ0_ena;                     /* 8 */
    volatile csr_int_typ0_ena_h_u int_typ0_ena_h;                 /* C */
    volatile csr_int_typ1_ena_u int_typ1_ena;                     /* 10 */
    volatile csr_int_typ1_ena_h_u int_typ1_ena_h;                 /* 14 */
    volatile csr_int_typ2_ena_u int_typ2_ena;                     /* 18 */
    volatile csr_int_typ2_ena_h_u int_typ2_ena_h;                 /* 1C */
    volatile csr_int_typ0_status_u int_typ0_status;               /* 20 */
    volatile csr_int_typ0_status_h_u int_typ0_status_h;           /* 24 */
    volatile csr_int_typ1_status_u int_typ1_status;               /* 28 */
    volatile csr_int_typ1_status_h_u int_typ1_status_h;           /* 2C */
    volatile csr_int_typ2_status_u int_typ2_status;               /* 30 */
    volatile csr_int_typ2_status_h_u int_typ2_status_h;           /* 34 */
    volatile csr_int_node_num_u int_node_num;                     /* 38 */
    volatile csr_ej_ctrl_u ej_ctrl;                               /* 3C */
    volatile csr_ce_cnt_cfg_u ce_cnt_cfg[58];                     /* 40 */
    volatile csr_int_src_trigger_type_l_u int_src_trigger_type_l; /* 200 */
    volatile csr_int_src_trigger_type_h_u int_src_trigger_type_h; /* 204 */
    volatile csr_ras_ctrl_iid_u ras_ctrl_iid;                     /* 210 */
} S_ras_int_coalesce_REGS_TYPE;

/* Declare the struct pointor of the module ras_int_coalesce */
extern volatile S_ras_int_coalesce_REGS_TYPE *gopras_int_coalesceAllReg;

/* Declare the functions that set the member value */
int iSetERR_MAPPING_int_typ0_map_to_fhi_en(unsigned int uint_typ0_map_to_fhi_en);
int iSetERR_MAPPING_int_typ0_map_to_eri_en(unsigned int uint_typ0_map_to_eri_en);
int iSetERR_MAPPING_int_typ1_map_to_fhi_en(unsigned int uint_typ1_map_to_fhi_en);
int iSetERR_MAPPING_int_typ1_map_to_eri_en(unsigned int uint_typ1_map_to_eri_en);
int iSetERR_MAPPING_int_typ2_map_to_fhi_en(unsigned int uint_typ2_map_to_fhi_en);
int iSetERR_MAPPING_int_typ2_map_to_eri_en(unsigned int uint_typ2_map_to_eri_en);
int iSetERR_MAPPING_to_gic_fhi_en(unsigned int uto_gic_fhi_en);
int iSetINT_TYP0_ENA_int_typ0_ena(unsigned int uint_typ0_ena);
int iSetINT_TYP0_ENA_H_int_typ0_ena_h(unsigned int uint_typ0_ena_h);
int iSetINT_TYP1_ENA_int_typ1_ena(unsigned int uint_typ1_ena);
int iSetINT_TYP1_ENA_H_int_typ1_ena_h(unsigned int uint_typ1_ena_h);
int iSetINT_TYP2_ENA_int_typ2_ena(unsigned int uint_typ2_ena);
int iSetINT_TYP2_ENA_H_int_typ2_ena_h(unsigned int uint_typ2_ena_h);
int iSetINT_TYP0_STATUS_int_typ0_status(unsigned int uint_typ0_status);
int iSetINT_TYP0_STATUS_H_int_typ0_status_h(unsigned int uint_typ0_status_h);
int iSetINT_TYP1_STATUS_int_typ1_status(unsigned int uint_typ1_status);
int iSetINT_TYP1_STATUS_H_int_typ1_status_h(unsigned int uint_typ1_status_h);
int iSetINT_TYP2_STATUS_int_typ2_status(unsigned int uint_typ2_status);
int iSetINT_TYP2_STATUS_H_int_typ2_status_h(unsigned int uint_typ2_status_h);
int iSetINT_NODE_NUM_int_node_num(unsigned int uint_node_num);
int iSetEJ_CTRL_ej_ctrl_en(unsigned int uej_ctrl_en);
int iSetCE_CNT_CFG_int_ce_cnt_cfg(unsigned int uint_ce_cnt_cfg);
int iSetINT_SRC_TRIGGER_TYPE_L_int_src_trigger_type_l(unsigned int uint_src_trigger_type_l);
int iSetINT_SRC_TRIGGER_TYPE_H_int_src_trigger_type_h(unsigned int uint_src_trigger_type_h);
int iSetRAS_CTRL_IID_ras_ctrl_iid(unsigned int uras_ctrl_iid);


#endif // RAS_C_UNION_DEFINE_H
